PAGE 1

ODE Refresher

1st-order linear

\[y'(t) + p(t)y(t) = q(t)\]

Integrating factor

\[\mu(t) = e^{\int p(t) dt}\]

leading coefficient is 1

multiply the ODE by \(\mu(t)\)

\[\mu y' + p \mu y = q \mu\]
\[\frac{d}{dt}(\mu y) = \mu q\]

integrate both sides and solve for \(y\)

Example

\[y' + \frac{2}{t}y = \frac{\cos(t)}{t^2} \quad (t > 0)\]
\[\mu = e^{\int \frac{2}{t} dt} = e^{2 \ln t} = e^{\ln t^2} = t^2\]
PAGE 2
\[t^2(y' + \frac{2}{t}y) = t^2 \cdot \frac{\cos(t)}{t^2}\]
\[t^2 y' + 2ty = \cos(t)\]
\[\frac{d}{dt}(t^2 y) = \cos(t)\]

integrate both sides

\[t^2 y = \sin(t) + C\]
\[y = \frac{\sin(t)}{t^2} + \frac{C}{t^2}\]

it will show up later when we solve the heat equation

\[\frac{\partial u}{\partial t} = \alpha^2 \frac{\partial^2 u}{\partial x^2} \quad u = u(x, t)\]

there is a 1st-order linear that needs to be solved

\[T'(t) + \alpha^2 \lambda T(t) = 0 \quad \alpha, \lambda \text{ constants } > 0\]
PAGE 3

this can also be solved as a separable eq.

\[ \frac{dT}{dt} = -\alpha^2 \lambda T \]\[ \frac{1}{T} dT = -\alpha^2 \lambda dt \]\[ \ln |T| = -\alpha^2 \lambda t + C \]\[ T(t) = e^{-\alpha^2 \lambda t + C} = e^{-\alpha^2 \lambda t} \left( e^C \right) \]

Constant

\[ T(t) = C e^{-\alpha^2 \lambda t} \]

in the context of heat eq, this tells us how heat dissipates as a function of time for a given \( \lambda \) and position.

Graph of temperature T versus time t showing two exponential decay curves, one labeled low alpha and one high alpha.
PAGE 4

2nd-order homogeneous

\[ y'' + ky = 0 \]

solutions are of the form \( e^{rt} \)

\( r \) is solution of the characteristic eq.

\[ r^2 + k = 0 \]\[ r^2 = -k \]

Case 1: \( k = 0 \)

if \( k = 0, r = 0, 0, y = C_1 + C_2 t \) (line)

Case 2: \( k > 0 \)

if \( k > 0, r = \pm \sqrt{-k} = \pm i \sqrt{|k|} \)

\[ y = \cos(\sqrt{k} t), y = \sin(\sqrt{k} t) \]\[ y = C_1 \cos(\sqrt{k} t) + C_2 \sin(\sqrt{k} t) \quad \text{(bounded)} \]

Case 3: \( k < 0 \)

if \( k < 0, r = \pm \sqrt{|k|} \)

\[ y = e^{\sqrt{|k|} t}, y = e^{-\sqrt{|k|} t} \]\[ y = C_1 e^{\sqrt{|k|} t} + C_2 e^{-\sqrt{|k|} t} \quad \text{(unbounded)} \]\[ y = d_1 \cosh(\sqrt{k} t) + d_2 \sinh(\sqrt{k} t) \]
PAGE 5

Hyperbolic Functions and Linear ODEs

\[ \cosh(x) = \frac{e^x + e^{-x}}{2} \quad \sinh(x) = \frac{e^x - e^{-x}}{2} \]

This shows up when we solve the heat, wave, and Laplace's eqs.

\[ X''(x) + \lambda X(x) = 0 \quad \text{or} \quad Y''(y) + \lambda Y(y) = 0 \]

(Note: X is uppercase)

Solutions:

  • \[ X(x) = C_1 \cos(\sqrt{\lambda} x) + C_2 \sin(\sqrt{\lambda} x) \quad \text{if } \lambda > 0 \]
  • \[ X(x) = C_1 \cosh(\sqrt{\lambda} x) + C_2 \sinh(\sqrt{\lambda} x) \quad \text{if } \lambda < 0 \]
  • \[ X(x) = C_1 + C_2 x \quad \text{if } \lambda = 0 \]

In the context of heat eq, this governs the space part of the solution (how temperature varies w/ position if time is fixed).

Now briefly about nonhomogeneous 2nd-order

PAGE 6

Nonhomogeneous Second-Order Systems

In the context of mass-spring system: \[ mx'' + kx = f(t) \]

When \[ f(t) = F_0 \sin(\omega t) \] (sinusoidal input)

  • \( \omega \) : input frequency
  • \( F_0 \) : input magnitude

Without Input (Homogeneous)

w/o input: \[ mx'' + kx = 0 \]

\[ x(t) = C_1 \cos\left(\sqrt{\frac{k}{m}} t\right) + C_2 \sin\left(\sqrt{\frac{k}{m}} t\right) \quad \text{(complementary solution)} \]

With Input (Nonhomogeneous)

w/ input:

\[ x(t) = C_1 \cos\left(\sqrt{\frac{k}{m}} t\right) + C_2 \sin\left(\sqrt{\frac{k}{m}} t\right) + x_p \]

Note: \( x_p \) is the particular solution.

\[ \sqrt{\frac{k}{m}} = \omega_0 \quad \text{(natural frequency)} \]

If \( \omega \neq \omega_0 \) (input freq \( \neq \) natural freq)

PAGE 7

Method of Undetermined Coefficients

We can solve using the method of undetermined coefficients:

\[ mx'' + kx = F_0 \sin(\omega t) \]

Let the particular solution be:

\[ x_p = A \cos(\omega t) + B \sin(\omega t) \]

Sub into the ODE:

\[ A = 0, \quad B = \frac{F_0}{k - m\omega^2} \]

There is trouble if \( k = m\omega^2 \) or \( \omega = \sqrt{\frac{k}{m}} \).

\[ x(t) = C_1 \cos\left(\sqrt{\frac{k}{m}} t\right) + C_2 \sin\left(\sqrt{\frac{k}{m}} t\right) + \frac{F_0}{k - m\omega^2} \sin(\omega t) \]

Resonance Case

But if input freq = natural freq \( \left( \omega = \sqrt{\frac{k}{m}}, \quad k - m\omega^2 = 0 \right) \):

\( x_p \) needs to be adjusted due to duplication of complementary solution.

\[ x_p = A t \cos(\omega t) + B t \sin(\omega t) \]

Sub into \( mx'' + kx = F_0 \sin(\omega t) \):

PAGE 8
\[ B = 0, \quad A = -\frac{F_0}{2m\omega} \]
\[ x(t) = C_1 \cos\left(\sqrt{\frac{k}{m}} t\right) + C_2 \sin\left(\sqrt{\frac{k}{m}} t\right) - \frac{F_0}{2m\omega} t \cos(\omega t) \]

Note: The term \( t \cos(\omega t) \) goes to \( \infty \) as \( t \) grows.

Resonance